package com.gite.nouette.admin.implementation.integrator.builder.command;

import com.gite.nouette.admin.contract.integrator.builder.command.IBuilderCommandCreateModule;
import com.gite.nouette.admin.contract.integrator.factory.IFactoryModel;
import com.gite.nouette.admin.contract.model.IManager;
import com.gite.nouette.admin.implementation.integrator.assembler.module.AssemblerModuleLogImpl;

public class BuilderCommandCreateModuleErrorImpl extends
		AbstractBuilderCommandCreateModule implements
		IBuilderCommandCreateModule {
	private IManager manager;

	private IManager getManager() {
		return this.manager;
	}

	private void setManager(IManager manager) {
		this.manager = manager;
	}

	public BuilderCommandCreateModuleErrorImpl(IFactoryModel factoryModel,
			IManager manager) {
		super(factoryModel);
		setManager(manager);
	}

	@Override
	public void buildName() {
		getProduct().setName("Ajouter module d'erreurs");
	}

	@Override
	public void buildAssembler() {
		getProduct().setAssembler(
				new AssemblerModuleLogImpl(getFactoryModel(), getManager(),
						getProduct()));
		getProduct().getAssembler().setParentProduct(getManager());
	}
}
